package com.leslie.springboottest.excption;

import com.leslie.springboottest.enums.PersonResponseEnum;

public class PersonException extends RuntimeException {
    private Integer code;

    public PersonException(PersonResponseEnum personResponseEnum){
        super(personResponseEnum.getMessage());
        this.code = personResponseEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
